Uno Project Format Reference
Uno Project Format Reference
A Uno project (.unoproj
) is a JSON document that describes your build configuration.
Uno Project files can be edited through the Fuse desktop tools, by the fuse
command line tool, or by editing the project file by hand in a text editor.
Unoproj.Macros:Macros
The uno project format supports a basic macro system.
This feature is used to implement many of the top-level properties, such as Title and Version.
For instance, say you set the Version
property as follows:
|
By default, both Android.VersionName and iOS.BundleVersion are set as follows:
|
This will make those properties inherit the top-level Version
property.
Unoproj.Includes:Includes and Unoproj.Excludes:Excludes
The Includes
and Excludes
properties lets you control which files to include in your project. They are both arrays of strings, as shown in the snippet below:
|
An include/exclude entry can take one of the following forms:
GlobPattern
A glob pattern, as described further down in this document.
|
The following glob features are supported:
- Brace expansion
- Extended glob matching
- Globstar matching
Patterns that do not contain a /
are matched recursively:
Pattern | Matches |
---|---|
* |
Matches all files |
*.foo |
Matches all files whose name ends in .foo |
*.bar |
Matches all files whose name ends in .bar |
*.+(bar|foo) |
Matches all files whose name ends in either .bar or .foo |
foobar |
Matches all files named foobar |
Add /
or ./
to disable recursion:
Pattern | Matches |
---|---|
/*.png |
Matches all PNG files found directly in the project directory |
Foo/*.png |
Matches all PNG files found directly in the Foo directory |
Use globstar (**
) for explicit recursion:
Pattern | Matches |
---|---|
Foo/**/*.uno |
Matches all Uno files in the Foo directory and its subdirectories |
FileName:Type
This tells the Uno compiler to include a single file, interpreting it as a certain type.
|
FileName:Type:Condition
In addition to a file of a certain type, you may specify a condition that will determine if the file will be included or not.
|
Unoproj.AllowedIncludeTypes:Allowed include types
The following values may be specified as the type of an included file.
- Glob
- Folder
- File
- UX
- Source
- Bundle
- CSource
- CHeader
- ObjCSource
- ObjCHeader
- Java
- Extensions
- Stuff
Unoproj.Packages:Packages
A list of packages to include in the build. When scaffolding your application, Fuse will include a standard set of packages to get you up and running.
|
All properties
Unoproj.Title:Title
The user-readable title of your app. Defaults to \Name
.
unrealisticallyLongNameForAnApp.unoproj:
|
Unoproj.Description:Description
User-readable description of your app. Empty by default.
|
Unoproj.Copyright:Copyright
Your app’s copyright notice. Defaults to Copyright (C) <current year> \Publisher
.
|
Unoproj.Publisher:Publisher
The legal entity in charge of publishing the application. Defaults to [Publisher]
.
|
Unoproj.Version:Version
The current version of your app, Defaults to 0.0.0
.
|
Unoproj.VersionCode:VersionCode
Some platforms (currently only Android) want an integral version code in addition to a version string. Further documentation can be found here. Defaults to 0
.
|
Unoproj.RootNamespace:RootNamespace
The root namespace to use. Defaults to \QIdentifier
.
|
Unoproj.BuildDirectory:BuildDirectory
Where to place temporary files and executables for various build configurations and targets. Defaults to build
.
|
Unoproj.OutputDirectory:OutputDirectory
Where to place temporary files and executables for the current build target and configuration.
Defaults to \BuildDirectory/\[Target](.html#Target)/\[Configuration](.html#Configuration)
.
|
Unoproj.CacheDirectory:CacheDirectory
Where to place Uno’s cache files. Defaults to .uno
.
|
Unoproj.UnoCoreReference:UnoCoreReference
Wether or not UnoCore should be referenced. You will probably never need this, as it’s only used internally. Defaults to true
.
|
Unoproj.Mobile:Mobile
A dictionary of options that apply to all mobile targets.
Unoproj.Mobile.KeepAlive:Mobile.KeepAlive
If set to true
, the screen won’t dim and eventually turn off while your app is open. Defaults to false
.
|
Unoproj.Mobile.ShowStatusbar:Mobile.ShowStatusbar
Wether or not to show the status bar. Defaults to true
.
|
Unoproj.Mobile.RunsInBackground:Mobile.RunsInBackground
Controls wether or not your app should continue running when the user presses the home button. Defaults to true
.
|
Unoproj.Mobile.Orientations:Mobile.Orientations
Specifies which screen orientations are allowed.
Can be one of the following values:
Auto
(default, all possible orientations)Portrait
PortraitUpsideDown
Landscape
LandscapeLeft
LandscapeRight
|
Unoproj.Android:Android
A dictionary of options that apply to Android targets only.
Unoproj.Android.ApplicationLabel:Android.ApplicationLabel
A user-readable label for the application, specific to Android. This is the Android equivalent of the top-level Title property. Defaults to \Title
.
|
Unoproj.Android.Description:Android.Description
The same as Description, but specific to Android. Defaults to \Description
.
|
Unoproj.Android.VersionCode:Android.VersionCode
The same as VersionCode, but specific to Android. Defaults to \VersionCode
.
|
Unoproj.Android.VersionName:Android.VersionName
The same as Version, but specific to Android. Defaults to \Version
.
|
Unoproj.Android.Package:Android.Package
The name of the java package to use for Android export. Defaults to \QIdentifier
.
|
Unoproj.Android.Icons:Android.Icons
Instead of providing one uniformly sized icon to be used on all platforms, you can specify different icons for different screen densities, specific to Android. These are grouped according to Android’s generalized densities, which you can read more about here. All of them default to \Icon
.
Note: This only applies to Android, however you can achieve the same on iOS using iOS.Icons.
|
Unoproj.Android.Key:Android.Key
See Signing for Android.
Unoproj.Android.Geo.ApiKey:Android.Geo.ApiKey
Your Google Maps API key, for use with MapView. More info can be found under Maps on Android.
|
Unoproj.Android.NDK.PlatformVersion:Android.NDK.PlatformVersion
The NDK platform version to use. Defaults to 9
.
|
Unoproj.Android.SDK:Android.SDK
Specifies version constraints for the Android SDK to build against.
The following example shows the default values of each property.
|
Unoproj.iOS.BundleIdentifier:iOS.BundleIdentifier
The iOS bundle identifier.
Defaults to \QIdentifier
.
Corresponds to CFBundleIdentifier.
|
Unoproj.iOS.BundleName:iOS.BundleName
A user-readable label for the application specific to iOS. This is the iOS equivalent of Android.ApplicationLabel.
Corresponds to CFBundleName.
Defaults to \Title
.
|
Unoproj.iOS.BundleVersion:iOS.BundleVersion
The same as Version, but specific to iOS.
Defaults to \Version
.
Corresponds to CFBundleVersion.
|
Unoproj.iOS.DeploymentTarget:iOS.DeploymentTarget
The minimum iOS version your app can run on.
Defaults to 8.0
.
|
Unoproj.iOS.Icons:iOS.Icons
Instead of providing one uniformly sized icon to be used on all platforms, you can specify different icons for different sizes and screen densities, specific to iOS.
All of them default to \Icon
.
Corresponds to CFBundleIconFiles.
Note: This only applies to iOS, however you can achieve the same on Android using Android.Icons.
|
Unoproj.iOS.LaunchImages:iOS.LaunchImages
Specifies launch images of different sizes to be used on iOS.
Corresponds to UILaunchImages.
|
Unoproj.iOS.PList:iOS.PList
A dictionary of entries that will be included in the Info.plist
file of the iOS bundle. Note that not all PList entries will work – only the ones that are included here.
Unoproj.iOS.PList.MKDirectionsApplicationSupportedModes:iOS.PList.MKDirectionsApplicationSupportedModes
An array of strings, specifying the modes of transportation for which the app is capable of giving map directions.
Reference can be found here.
|
Unoproj.iOS.PList.UIRequiredDeviceCapabilities:iOS.PList.UIRequiredDeviceCapabilities
An array of strings, specifying which device-related capabilities must be available for the app to function.
Reference can be found here.
|
Unoproj.iOS.PList.NSHealthShareUsageDescription:iOS.PList.NSHealthShareUsageDescription
A message that will be shown to the user when the app is requesting HealthKit data.
|
Unoproj.iOS.PList.UIApplicationExitsOnSuspend:iOS.PList.UIApplicationExitsOnSuspend
When true
, the app will terminate rather than being sent to the background when the user presses the home button. Defaults to false
.
Reference can be found here.
|
Unoproj.iOS.PList.UIFileSharingEnabled:iOS.PList.UIFileSharingEnabled
Specifies wether the app can share files through iTunes when connected to a computer.
Defaults to false
.
Reference can be found here.
|
Unoproj.iOS.PList.UINewsstandApp:iOS.PList.UINewsstandApp
Specifies wether the app presents its contents in the iOS Newsstand app. Defaults to false
.
Reference can be found here.
|
Unoproj.iOS.PList.UIPrerenderedIcon:iOS.PList.UIPrerenderedIcon
|
Unoproj.iOS.PList.UISupportedExternalAccessoryProtocols:iOS.PList.UISupportedExternalAccessoryProtocols
An array of strings specifying which external accessory protocols your app is capable of communicating over. Defaults to []
.
Reference can be found here.
|
Unoproj.iOS.PList.UIViewEdgeAntialiasing:iOS.PList.UIViewEdgeAntialiasing
Specifies whether Core Animation layers use antialiasing when drawing a layer that is not aligned to pixel boundaries. Defaults to false
.
Reference can be found here.
|
Signing for Android
A Uno Project set up for signing can look like this:
|
A file named release.keystore
is expected to be found in the same folder as the project.
This file can be created by running the following command in your shell (keytool
is found in Android SDK):
|
Note that only release builds are signed using the specified key. Debug builds are automatically signed using a debug key. To do a release build, use uno build --target=Android --configuration=Release
.
Signing for iOS
Run the following command in your shell:
|
Then follow the regular procedure for adding your signing certificate and then submitting your app to the iOS App Store.